import {
  createRouter,
  createWebHashHistory
} from 'vue-router'

// 独立跳转登录注册页面
import LoginVue from '../first/LoginVue.vue'
import RegisterVue from '../first/RegisterVue.vue'

// 登录成功后的主页面
import AdminIndex from '../second/AdminIndex.vue'
import UserIndex from '../second/UserIndex.vue'

//选座位页面
import PreorderVue from '../components/PreorderVue.vue'

// 中间右边主体框用户
import RoomVue from "../components/RoomVue.vue";
import EditPassWordVue from "../components/EditPassWordVue.vue"
import AddMessageVue from "../components/AddMessageVue.vue"
import EditTouXiangVue from "../components/EditTouXiangVue.vue"
import ShowMessageVue from "../components/ShowMessageVue.vue"
import FeedBackVue from "../components/FeedBackVue.vue"
import ShowSeatVue from "../components/ShowSeatVue.vue"

//中间右边主题框管理员
import SelectUserVue from "../manager/SelectUserVue.vue";
import RoomManagerVue from "../manager/RoomManagerVue.vue"
import ShiJianDuanVue from "../manager/ShiJianDuanVue.vue"
import JianYiVue from "../manager/JianYiVue.vue"
import SelectSeatVue from "../manager/SelectSeatVue.vue"

const routes = [{
    path: '/',
    name: "LoginVue",
    component: LoginVue
  },
  {
    path: '/RegisterVue',
    name: "RegisterVue",
    component: RegisterVue
  },
  {
    path: '/UserIndex',
    name: "UserIndex",
    component: UserIndex
  },
  {
    path: '/AdminIndex',
    name: "AdminIndex",
    component: AdminIndex
  },
  {
    path: '/PreorderVue',
    name: "PreorderVue",
    component: PreorderVue
  },
  {
    path: '/SelectSeatVue',
    name: "SelectSeatVue",
    component: SelectSeatVue
  },



  {
    path: '/components',
    component: UserIndex,
    children: [{
        path: "RoomVue",
        component: RoomVue,
      },
      {
        path: "EditPassWordVue",
        component: EditPassWordVue,
      },
      {
        path: "AddMessageVue",
        component: AddMessageVue,
      },
      {
        path: "EditTouXiangVue",
        component: EditTouXiangVue,
      },
      {
        path: "ShowMessageVue",
        component: ShowMessageVue,
      },
      {
        path: "FeedBackVue",
        component: FeedBackVue,
      },
      {
        path: "ShowSeatVue",
        component: ShowSeatVue,
      },
    ]
  },
  {
    path: '/com',
    component: AdminIndex,
    children: [{
        path: "SelectUserVue",
        component: SelectUserVue,
      },
      {
        path: "RoomManagerVue",
        component: RoomManagerVue,
      },
      {
        path: "ShiJianDuanVue",
        component: ShiJianDuanVue,
      },
      {
        path: "EditTouXiangVue",
        component: EditTouXiangVue,
      },
      {
        path: "JianYiVue",
        component: JianYiVue,
      },
    ]
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})


export default router